oracle.ord.hadoop.decoder

## Class OrdFrameGrabber

- java.lang.Object
- - oracle.ord.hadoop.decoder.OrdFrameGrabber

-     public abstract class OrdFrameGrabber
      extends java.lang.Object

  OrdFrameGrabber is an abstract class that allows decoding video data stored on Hadoop file system.

  The OrdFrameGrabber object is contructed with org.apache.hadoop.fs.FSDataInputStream object.

  The video frame is returned as a java.awt.image.BufferedImage object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.hadoop.fs.FSDataInputStream` | `m_in`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrdFrameGrabber(org.apache.hadoop.fs.FSDataInputStream in)` Creates an OrdFrameGrabber object that decodes video frames from the specified FSDataInputStream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `close()` Close the OrdFrameGrabber object, releasing any resources being used.
    `abstract double` | `getTotalDuration()` Returns the duration of the video that the OrdFrameGrabber object decodes.
    `abstract java.awt.image.BufferedImage` | `nextFrame()` Returns next frame data that the OrdFrameGrabber object decodes from the video at the time set by the seekToSecond method.
    `abstract double` | `seekToSecond(double second)` Seek to the time at which the next frame decoding operation will occur.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### m_in

          protected org.apache.hadoop.fs.FSDataInputStream m_in

  - ### Constructor Detail

    - #### OrdFrameGrabber

          public OrdFrameGrabber(org.apache.hadoop.fs.FSDataInputStream in)

      Creates an OrdFrameGrabber object that decodes video frames from the specified FSDataInputStream.
      Parameters:
        `in` - the FSDataInputStream from which data will be read.

  - ### Method Detail

    - #### nextFrame

          public abstract java.awt.image.BufferedImage nextFrame()
                                                          throws java.io.IOException

      Returns next frame data that the OrdFrameGrabber object decodes from the video at the time set by the seekToSecond method.
      Returns:
        the BufferedImage including the next frame data.
      Throws:
        `java.io.IOException` - if a decoding error occurs.

    - #### seekToSecond

          public abstract double seekToSecond(double second)
                                       throws java.io.IOException

      Seek to the time at which the next frame decoding operation will occur. The time unit is second.
      Parameters:
        `second` - the time at which the next frame decoding operation will occur.
      Returns:
        the time which is seeked to, or -1 if seeking failed.
      Throws:
        `java.io.IOException` - if a seeking error occurs.

    - #### getTotalDuration

          public abstract double getTotalDuration()

      Returns the duration of the video that the OrdFrameGrabber object decodes.
      Returns:
        the duration of the video.

    - #### close

          public abstract void close()

      Close the OrdFrameGrabber object, releasing any resources being used.

Copyright � 2015, Oracle and/or its affiliates. All rights reserved.